package com.winway.boot;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;

/**
 * SRM系统启动类
 */
@Slf4j
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ComponentScan(basePackages = {"com.winway.*"})
@MapperScan("com.winway.*.mapper")
@EnableConfigurationProperties
public class SrmApplication {
    public static void main(String[] args) {
        // 启动应用
        SpringApplication application = new SpringApplication(SrmApplication.class);
        application.run(args);

        // 启动成功后显示LOGO
        log.info("\n" +
                "  ___       _                          \n" +
                " / _ \\     | |                         \n" +
                "/ /_\\ \\  __| |_ __   __ _  __ _ _ __   \n" +
                "|  _  | / _` | '_ \\ / _` |/ _` | '_ \\  \n" +
                "| | | || (_| | | | | (_| | (_| | | | | \n" +
                "\\_| |_/ \\__,_|_| |_|\\__,_|\\__,_|_| |_| \n" +
                "                                       \n" +
                "(♥◠‿◠)ﾉﾞ  SRM项目启动成功  ლ(´ڡ`ლ)ﾞ\n");
    }
}
